import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { BookComponent } from './book/book.component';
import { DetailComponent } from './detail/detail.component';


const routes: Routes = [
    { path: 'book', component: BookComponent },
    { path: 'detail/:cid', component: DetailComponent },
    { path: '', redirectTo: '/book', pathMatch: 'full' },
];

@NgModule({
    exports: [RouterModule],
    imports: [RouterModule.forRoot(routes, {

    })],
    providers: []
})
export class AppRoutingModule {
}